<template>
	<view class="contont" style="background-color: #F5F5F5;">
		<view style="width: 355px;height: 92px;margin-top: 10px;border-radius:8px;background-color: #FFFFFF;" class="cent"  @click="but">
			<view style="display: flex;justify-content: space-between;" >
				<image src="../../static/img/icon_jiqiache_small.png" mode="" style="width: 14px;height: 18px;margin-left: 15px;margin-right: 15px;"></image>
				<view style="flex-direction: column;display: flex;justify-content: space-between;width: 200px;">
									<view style="font-size: 18px;color: #042A58;">{{list.carnum}}</view>
				<view style="margin-top: 9px;font-size: 15px;color: #97A9BF;display: flex;color: #042A58;">
					<text class="book">{{list.carmodel}}</text>
					<text style="margin-left: 22px;" class="book">{{list.carlenth}}</text>
					<view class="book" style="margin-left: 22px;">
					<text v-if="list.carPlateColor=='BLUE'">蓝牌</text>
					<text v-if="list.carPlateColor=='YELLOW'">黄牌</text>
					<text v-if="list.carPlateColor=='BLACK'">黑牌</text>
					<text v-if="list.carPlateColor=='WHITE'">白牌</text>
					<text v-if="list.carPlateColor=='GRADUALGREEN'">渐变绿色</text>
					<text v-if="list.carPlateColor=='GRADUALYELLOWGREEN'">黄绿渐变</text>
					<text v-if="list.carPlateColor=='GRADUALBLUEWHITE'">蓝白渐变</text>
					<text v-if="list.carPlateColor=='UNDEFINED'">未确定</text>
					</view>
				</view>
				</view>

			</view>
			<view style="font-size: 15px;color: #042A58;height: 50%;margin-right: 15px;">
				<text  v-if="list.carStatus==1" style="color: #002CFF;">
					审核中
				</text>
				<text  v-if="list.carStatus==2" style="color: #002CFF;">
					认证失败
				</text>
				<text  v-if="list.carStatus==3" style="color: #002CFF;">
					已过期
				</text>
				<text  v-if="list.carStatus==4" style="color: #002CFF;">
					快过期
				</text>
				<text  v-if="list.carStatus==5" style="color: #002CFF;">
					已认证
				</text>
			</view>
		</view>
		<view class="xing">
			<view style="display: flex;align-items: center;margin-top: 20px;color: #000000;font-size: 14px;">
				<image src="../../static/img/img_xiangji.png" mode="" style="width: 16px;height: 14px;margin-left: 20px;"></image>
				<text style="margin-left: 6px;">行驶证照片</text>
			</view>
			<view style="
			width:325px;
			height:162px;
			background:rgba(240,240,240,1);
			border-radius:8px;
			margin-top: 10px;
			margin-left: 15px;
			display: flex;
			align-items: center;
			justify-content: center;
			">
				<image :src="img" mode="" style="width:312px;height:112px;"></image>
			</view>
		</view>
		<view style="margin-left: 30px;width: 100%;margin-top: 15px;">
			<text style="color: #FE0700;font-size: 14px;">* 修改车辆信息后将对车辆重新进行认证</text>
		</view>
		
		<button  @click="but">
			修改车辆信息
		</button>
	</view>
</template>

<script>
	import {ajax} from '../../api.js'
	export default {
		data() {
			return {
			vehi:0,
			list:[],
			img:""
			}
		},
		onShow() {
			var that=this
uni.showLoading({
  title: '加载中...',
})
		ajax({
			url:"/v1/appdriver/user/carprofile",
			method:"post",
			success(res){
				
				if(res.data.message.carnum==""){
						uni.hideLoading()

				}else{
				uni.hideLoading()
					that.list=res.data.message
					that.img="https://www.uhuoda.com"+res.data.message.cardrivingnumphotoz
					console.log(res.data.message)
				}
			}
		})
		},
		methods: {
		but(){
				uni.navigateTo({
					url:"../cart/carting?id=1"
				})
		}
		}
	}
</script>

<style>
	.xing{
		width:355px;
		height:236px;
		background:rgba(255,255,255,1);
		border-radius:8px;
		margin-top: 10px;
	}
	button{
		width:345px;
		height:44px;
		background:rgba(4,42,88,1);
		border-radius:8px;
		position: fixed;
		bottom: 30px;
		color: #FFFFFF;
	}
	page{
		height: 100%;
	}
	.book{
		background:rgba(242,243,246,1);
		border-radius:4px;
		padding: 5px 8px 5px 8px;
	}
</style>
